class CreateUsers < ActiveRecord::Migration[5.0]
  def change
    create_table :users do |t|

      t.string :mobile
      t.string :nickname
      t.string :name
      t.text :description
      t.string :email
      t.string :password
      t.string :password_digest
      t.string :encrypted_password
      t.string :password_reset_token
      t.date :password_reset_token_sent_at
      t.string :confirmation_token

      t.datetime :confirmed_at
      t.datetime :confirmation_sent_at

      t.integer  :sign_in_count, default: 0, null: false
      t.datetime :current_sign_in_at
      t.datetime :last_sign_in_at
      t.string   :current_sign_in_ip
      t.string   :last_sign_in_ip

      t.string :uuid

      t.timestamps null: false
    end

    add_index :users, [:uuid], unique: true
  end
end

